import request from '@/utils/request'

export function getAll() {
  return request({
    url: '/type/select',
    method: 'get',
  })
}

export function create(data) {
  return request({
    url: '/type/create',
    method: 'post',
    data: data
  })
}

export function update(id, data) {
  return request({
    url: `/type/update/${id}`,
    method: 'post',
    data
  });
}

export function deleteById(id) {
  return request({
    url: `/type/delete/${id}`,
    method: 'post'
  });
}
